home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / VideoFolder 1.0a / Source / MoreFiles 1.4.1 / MoreFiles.h < prev    next >
Text File  |  1995-12-21  |  27KB  |  807 lines

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    The long lost high-level and FSSpec File Manager functions.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support Emeritus
  7. **
  8. **    File:        MoreFiles.h
  9. **
  10. **    Copyright © 1992-1995 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILES__
  23. #define __MOREFILES__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. /*****************************************************************************/
  33.  
  34. pascal    OSErr    HGetVolParms(StringPtr volName,
  35.                              short vRefNum,
  36.                              GetVolParmsInfoBuffer *volParmsInfo,
  37.                              long *infoSize);
  38. /*    ¶ Determine the characteristics of a volume.
  39.     The HGetVolParms function returns information about the characteristics
  40.     of a volume. A result of paramErr usually just means the volume doesn't
  41.     support PBHGetVolParms and the feature you were going to check
  42.     for isn't available.
  43.  
  44.     volName            input:    A pointer to the name of a mounted volume
  45.                             or nil.
  46.     vRefNum            input:    Volume specification.
  47.     volParmsInfo    input:    Pointer to GetVolParmsInfoBuffer where the
  48.                             volume attributes information is returned.
  49.                     output:    Atributes information.
  50.     infoSize        input:    Size of buffer pointed to by volParmsInfo.
  51.                     output: Size of data actually returned.
  52.  
  53.     __________
  54.     
  55.     Also see the macros for checking attribute bits in MoreFilesExtras.h
  56. */
  57.  
  58. /*****************************************************************************/
  59.  
  60. pascal    OSErr    HCreateMinimum(short vRefNum,
  61.                                long dirID,
  62.                                ConstStr255Param fileName);
  63. /*    ¶ Create a new file with no creator or file type.
  64.     The HCreateMinimum function creates a new file without attempting to set
  65.     the creator and file type of the new file.  This function is needed to
  66.     create a file in an AppleShare "drop box" where the user can make
  67.     changes, but cannot see folder or files.
  68.     
  69.     vRefNum        input:    Volume specification.
  70.     dirID        input:    Directory ID.
  71.     fileName    input:    The name of the new file.
  72.  
  73.     __________
  74.     
  75.     Also see:    FSpCreateMinimum
  76. */
  77.  
  78. /*****************************************************************************/
  79.  
  80. pascal    OSErr    FSpCreateMinimum(const FSSpec *spec);
  81. /*    ¶ Create a new file with no creator or file type.
  82.     The FSpCreateMinimum function creates a new file without attempting to set 
  83.     the the creator and file type of the new file.  This function is needed to
  84.     create a file in an AppleShare "dropbox" where the user can make
  85.     changes, but cannot see folder or files. 
  86.     
  87.     spec        input:    An FSSpec record specifying the file to create.
  88.  
  89.     __________
  90.     
  91.     Also see:    HCreateMinimum
  92. */
  93.  
  94. /*****************************************************************************/
  95.  
  96. pascal    OSErr    ExchangeFiles(short vRefNum,
  97.                               long srcDirID,
  98.                               ConstStr255Param srcName,
  99.                               long dstDirID,
  100.                               ConstStr255Param dstName);
  101. /*    ¶ Exchange the data stored in two files on the same volume.
  102.     The ExchangeFiles function swaps the data in two files on the same
  103.     volume by changing some of the information in the volume catalog and,
  104.     if the files are open, in the file control blocks.
  105.  
  106.     vRefNum        input:    Volume specification.
  107.     srcDirID    input:    Source directory ID.
  108.     srcName        input:    Source file name.
  109.     dstDirID    input:    Destination directory ID.
  110.     dstName        input:    Destination file name.
  111.  
  112.     __________
  113.     
  114.     Also see:    FSpExchangeFilesCompat
  115. */
  116.  
  117. /*****************************************************************************/
  118.  
  119. pascal    OSErr    ResolveFileIDRef(StringPtr volName,
  120.                                  short vRefNum,
  121.                                  long fileID,
  122.                                  long *parID,
  123.                                  StringPtr fileName);
  124. /*    ¶ Retrieve the location of the file with the specified file ID.
  125.     The ResolveFileIDRef function returns the filename and parent directory ID
  126.     of the file with the specified file ID.
  127.     
  128.     volName    input:    A pointer to the name of a mounted volume
  129.                     or nil.
  130.     fileID    input:    The file ID.
  131.     vRefNum    input:    Volume specification.
  132.     parID    output:    The parent directory ID of the file.
  133.     name    input:    Points to a buffer (minimum Str63) where the filename
  134.                     is to be returned or must be nil.
  135.             output:    The filename.
  136.  
  137.     __________
  138.     
  139.     Also see:    CreateFileIDRef, FSpCreateFileIDRef, DeleteFileIDRef
  140. */
  141.  
  142. /*****************************************************************************/
  143.  
  144. pascal    OSErr    CreateFileIDRef(short vRefNum,
  145.                                 long parID,
  146.                                 ConstStr255Param fileName,
  147.                                 long *fileID);
  148. /*    ¶ Establish a file ID for a file.
  149.     The CreateFileIDRef function creates a file ID for the specified file,
  150.     or if a file ID already exists, supplies the file ID and returns the
  151.     result code fidExists
  152.  
  153.     vRefNum        input:    Volume specification.
  154.     parID        input:    Directory ID.
  155.     fileName    input:    The name of the file.
  156.     fileID        output:    The file ID.
  157.  
  158.     __________
  159.     
  160.     Also see:    ResolveFileIDRef, FSpCreateFileIDRef, DeleteFileIDRef
  161. */
  162.  
  163. /*****************************************************************************/
  164.  
  165. pascal    OSErr    FSpCreateFileIDRef(const FSSpec *spec,
  166.                                    long *fileID);
  167. /*    ¶ Establish a file ID for a file.
  168.     The FSpCreateFileIDRef function creates a file ID for the specified file,
  169.     or if a file ID already exists, supplies the file ID and returns the
  170.     result code fidExists
  171.  
  172.     spec        input:    An FSSpec record specifying the file.
  173.     fileID        output:    The file ID.
  174.  
  175.     __________
  176.     
  177.     Also see:    ResolveFileIDRef, CreateFileIDRef, DeleteFileIDRef
  178. */
  179.  
  180. /*****************************************************************************/
  181.  
  182. pascal    OSErr    DeleteFileIDRef(StringPtr volName,
  183.                                 short vRefNum,
  184.                                 long fileID);
  185. /*    ¶ Delete a file ID reference.
  186.     The DeleteFileIDRef function deletes a file ID reference.
  187.  
  188.     volName    input:    A pointer to the name of a mounted volume
  189.                     or nil.
  190.     vRefNum    input:    Volume specification.
  191.     fileID    input:    The file ID.
  192.  
  193.     __________
  194.     
  195.     Also see:    ResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef
  196. */
  197.  
  198. /*****************************************************************************/
  199.  
  200. pascal    OSErr    FlushFile(short refNum);
  201. /*    ¶ Write the contents of a file's access path buffer (the fork data).
  202.     The FlushFile function writes the contents of a file's access path
  203.     buffer (the fork data) to the volume. Note: some of the file's catalog
  204.     information stored on the volume may not be correct until FlushVol
  205.     is called.
  206.  
  207.     refNum    input:    The file reference number of an open file.
  208. */
  209.  
  210. /*****************************************************************************/
  211.  
  212. pascal    OSErr    LockRange(short refNum,
  213.                           long rangeLength,
  214.                           long rangeStart);
  215. /*    ¶ Lock a portion of a file.
  216.     The LockRange function locks (denies access to) a portion of a file
  217.     that was opened with shared read/write permission.
  218.  
  219.     refNum        input:    The file reference number of an open file.
  220.     rangeLength    input:    The number of bytes in the range.
  221.     rangeStart    input:    The starting byte in the range to lock.
  222.  
  223.     __________
  224.     
  225.     Also see:    UnlockRange
  226. */
  227.  
  228. /*****************************************************************************/
  229.  
  230. pascal    OSErr    UnlockRange(short refNum,
  231.                             long rangeLength,
  232.                             long rangeStart);
  233. /*    ¶ Unlock a previously locked range.
  234.     The UnlockRange function unlocks (allows access to) a previously locked
  235.     portion of a file that was opened with shared read/write permission.
  236.  
  237.     refNum        input:    The file reference number of an open file.
  238.     rangeLength    input:    The number of bytes in the range.
  239.     rangeStart    input:    The starting byte in the range to unlock.
  240.  
  241.     __________
  242.     
  243.     Also see:    LockRange
  244. */
  245.  
  246. /*****************************************************************************/
  247.  
  248. pascal    OSErr    GetForeignPrivs(short vRefNum,
  249.                                 long dirID,
  250.                                 StringPtr name,
  251.                                 void *foreignPrivBuffer,
  252.                                 long *foreignPrivSize,
  253.                                 long *foreignPrivInfo1,
  254.                                 long *foreignPrivInfo2,
  255.                                 long *foreignPrivInfo3,
  256.                                 long *foreignPrivInfo4);
  257. /*    ¶ Retrieve the native access-control information.
  258.     The GetForeignPrivs function retrieves the native access-control
  259.     information for a file or directory stored on a volume managed by
  260.     a foreign file system.
  261.     
  262.     vRefNum                input:    Volume specification.
  263.     dirID                input:    Directory ID.
  264.     name                input:    Pointer to object name, or nil when dirID
  265.                                 specifies a directory that's the object.
  266.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  267.                                 information is returned.
  268.                         output:    Privilege information.
  269.     foreignPrivSize        input:    Size of buffer pointed to by
  270.                                 foreignPrivBuffer.
  271.                         output: Amount of buffer actually used.
  272.     foreignPrivInfo1    output:    Information specific to privilege model.
  273.     foreignPrivInfo2    output:    Information specific to privilege model.
  274.     foreignPrivInfo3    output:    Information specific to privilege model.
  275.     foreignPrivInfo4    output:    Information specific to privilege model.
  276.  
  277.     __________
  278.     
  279.     Also see:    FSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  280. */
  281.  
  282. /*****************************************************************************/
  283.  
  284. pascal    OSErr    FSpGetForeignPrivs(const FSSpec *spec,
  285.                                    void *foreignPrivBuffer,
  286.                                    long *foreignPrivSize,
  287.                                    long *foreignPrivInfo1,
  288.                                    long *foreignPrivInfo2,
  289.                                    long *foreignPrivInfo3,
  290.                                    long *foreignPrivInfo4);
  291. /*    ¶ Retrieve the native access-control information.
  292.     The FSpGetForeignPrivs function retrieves the native access-control
  293.     information for a file or directory stored on a volume managed by
  294.     a foreign file system.
  295.     
  296.     spec                input:    An FSSpec record specifying the object.
  297.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  298.                                 information is returned.
  299.                         output:    Privilege information.
  300.     foreignPrivSize        input:    Size of buffer pointed to by
  301.                                 foreignPrivBuffer.
  302.                         output: Amount of buffer actually used.
  303.     foreignPrivInfo1    output:    Information specific to privilege model.
  304.     foreignPrivInfo2    output:    Information specific to privilege model.
  305.     foreignPrivInfo3    output:    Information specific to privilege model.
  306.     foreignPrivInfo4    output:    Information specific to privilege model.
  307.  
  308.     __________
  309.     
  310.     Also see:    GetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  311. */
  312.  
  313. /*****************************************************************************/
  314.  
  315. pascal    OSErr    SetForeignPrivs(short vRefNum,
  316.                                 long dirID,
  317.                                 StringPtr name,
  318.                                 void *foreignPrivBuffer,
  319.                                 long *foreignPrivSize,
  320.                                 long foreignPrivInfo1,
  321.                                 long foreignPrivInfo2,
  322.                                 long foreignPrivInfo3,
  323.                                 long foreignPrivInfo4);
  324. /*    ¶ Change the native access-control information.
  325.     The SetForeignPrivs function changes the native access-control
  326.     information for a file or directory stored on a volume managed by
  327.     a foreign file system.
  328.     
  329.     vRefNum                input:    Volume specification.
  330.     dirID                input:    Directory ID.
  331.     name                input:    Pointer to object name, or nil when dirID
  332.                                 specifies a directory that's the object.
  333.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  334.     foreignPrivSize        input:    Size of buffer pointed to by
  335.                                 foreignPrivBuffer.
  336.                         output: Amount of buffer actually used.
  337.     foreignPrivInfo1    input:    Information specific to privilege model.
  338.     foreignPrivInfo2    input:    Information specific to privilege model.
  339.     foreignPrivInfo3    input:    Information specific to privilege model.
  340.     foreignPrivInfo4    input:    Information specific to privilege model.
  341.  
  342.     __________
  343.     
  344.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs
  345. */
  346.  
  347. /*****************************************************************************/
  348.  
  349. pascal    OSErr    FSpSetForeignPrivs(const FSSpec *spec,
  350.                                    void *foreignPrivBuffer,
  351.                                    long *foreignPrivSize,
  352.                                    long foreignPrivInfo1,
  353.                                    long foreignPrivInfo2,
  354.                                    long foreignPrivInfo3,
  355.                                    long foreignPrivInfo4);
  356. /*    ¶ Change the native access-control information.
  357.     The FSpSetForeignPrivs function changes the native access-control
  358.     information for a file or directory stored on a volume managed by
  359.     a foreign file system.
  360.     
  361.     spec                input:    An FSSpec record specifying the object.
  362.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  363.     foreignPrivSize        input:    Size of buffer pointed to by
  364.                                 foreignPrivBuffer.
  365.                         output: Amount of buffer actually used.
  366.     foreignPrivInfo1    input:    Information specific to privilege model.
  367.     foreignPrivInfo2    input:    Information specific to privilege model.
  368.     foreignPrivInfo3    input:    Information specific to privilege model.
  369.     foreignPrivInfo4    input:    Information specific to privilege model.
  370.  
  371.     __________
  372.     
  373.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs
  374. */
  375.  
  376. /*****************************************************************************/
  377.  
  378. pascal    OSErr    HGetLogInInfo(StringPtr volName,
  379.                               short vRefNum,
  380.                               short *loginMethod,
  381.                               StringPtr userName);
  382. /*    ¶ Get the login method and user name used to log on to a shared volume.
  383.     The HGetLogInInfo function retrieves the login method and user name
  384.     used to log on to a particular shared volume.
  385.     
  386.     volName        input:    A pointer to the name of a mounted volume
  387.                         or nil.
  388.     vRefNum        input:    The volume reference number.
  389.     loginMethod    output:    The login method used (kNoUserAuthentication,
  390.                         kPassword, kEncryptPassword, or
  391.                         kTwoWayEncryptPassword).
  392.     userName    input:    Points to a buffer (minimum Str31) where the user
  393.                         name is to be returned or must be nil.
  394.                 output:    The user name.
  395.  
  396.     __________
  397.     
  398.     Also see:    HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  399.                 FSpSetDirAccess, HMapName, HMapID
  400. */
  401.  
  402. /*****************************************************************************/
  403.  
  404. pascal    OSErr    HGetDirAccess(short vRefNum,
  405.                               long dirID,
  406.                               StringPtr name,
  407.                               long *ownerID,
  408.                               long *groupID,
  409.                               long *accessRights);
  410. /*    ¶ Get a directory's access control information on a shared volume.
  411.     The HGetDirAccess function retrieves the directory access control
  412.     information for a directory on a shared volume.
  413.     
  414.     vRefNum            input:    Volume specification.
  415.     dirID            input:    Directory ID.
  416.     name            input:    Pointer to directory name, or nil if dirID
  417.                             specifies the directory.
  418.     ownerID            output:    The directory's owner ID.
  419.     groupID            output:    The directory's group ID or
  420.                             0 if no group affiliation.
  421.     accessRights    output:    The directory's access rights.
  422.  
  423.     __________
  424.     
  425.     Also see:    HGetLogInInfo, FSpGetDirAccess, HSetDirAccess,
  426.                 FSpSetDirAccess, HMapName, HMapID
  427. */
  428.  
  429. /*****************************************************************************/
  430.  
  431. pascal    OSErr    FSpGetDirAccess(const FSSpec *spec,
  432.                                 long *ownerID,
  433.                                 long *groupID,
  434.                                 long *accessRights);
  435. /*    ¶ Get a directory's access control information on a shared volume.
  436.     The FSpGetDirAccess function retrieves the directory access control
  437.     information for a directory on a shared volume.
  438.     
  439.     spec            input:    An FSSpec record specifying the directory.
  440.     ownerID            output:    The directory's owner ID.
  441.     groupID            output:    The directory's group ID or
  442.                             0 if no group affiliation.
  443.     accessRights    output:    The directory's access rights.
  444.  
  445.     __________
  446.     
  447.     Also see:    HGetLogInInfo, HGetDirAccess, HSetDirAccess,
  448.                 FSpSetDirAccess, HMapName, HMapID
  449. */
  450.  
  451. /*****************************************************************************/
  452.  
  453. pascal    OSErr    HSetDirAccess(short vRefNum,
  454.                               long dirID,
  455.                               StringPtr name,
  456.                               long ownerID,
  457.                               long groupID,
  458.                               long accessRights);
  459. /*    ¶ Set a directory's access control information on a shared volume.
  460.     The HSetDirAccess function changes the directory access control
  461.     information for a directory on a shared volume. You must own a directory
  462.     to change its access control information.
  463.     
  464.     vRefNum            input:    Volume specification.
  465.     dirID            input:    Directory ID.
  466.     name            input:    Pointer to directory name, or nil if dirID
  467.                             specifies the directory.
  468.     ownerID            input:    The directory's owner ID.
  469.     groupID            input:    The directory's group ID or
  470.                             0 if no group affiliation.
  471.     accessRights    input:    The directory's access rights.
  472.  
  473.     __________
  474.     
  475.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess,
  476.                 FSpSetDirAccess, HMapName, HMapID
  477. */
  478.  
  479. /*****************************************************************************/
  480.  
  481. pascal    OSErr    FSpSetDirAccess(const FSSpec *spec,
  482.                                 long ownerID,
  483.                                 long groupID,
  484.                                 long accessRights);
  485. /*    ¶ Set a directory's access control information on a shared volume.
  486.     The FSpSetDirAccess function changes the directory access control
  487.     information for a directory on a shared volume. You must own a directory
  488.     to change its access control information.
  489.     
  490.     spec            input:    An FSSpec record specifying the directory.
  491.     ownerID            input:    The directory's owner ID.
  492.     groupID            input:    The directory's group ID or
  493.                             0 if no group affiliation.
  494.     accessRights    input:    The directory's access rights.
  495.  
  496.     __________
  497.     
  498.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  499.                 HMapName, HMapID
  500. */
  501.  
  502. /*****************************************************************************/
  503.  
  504. pascal    OSErr    HMapID(StringPtr volName,
  505.                        short vRefNum,
  506.                        long ugID,
  507.                        short objType,
  508.                        StringPtr name);
  509. /*    ¶ Map a user or group ID to a user or group name.
  510.     The HMapID function determines the name of a user or group if you know
  511.     the user or group ID.
  512.     
  513.     volName        input:    A pointer to the name of a mounted volume
  514.                         or nil.
  515.     vRefNum        input:    Volume specification.
  516.     objType        input:    The mapping function code: 1 if you're mapping a
  517.                         user ID to a user name or 2 if you're mapping a
  518.                         group ID to a group name.
  519.     name        input:    Points to a buffer (minimum Str31) where the user
  520.                         or group name is to be returned or must be nil.
  521.                 output:    The user or group name.
  522.  
  523.     __________
  524.     
  525.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  526.                 FSpSetDirAccess, HMapName
  527. */
  528.  
  529. /*****************************************************************************/
  530.  
  531. pascal    OSErr    HMapName(StringPtr volName,
  532.                          short vRefNum,
  533.                          ConstStr255Param name,
  534.                          short objType,
  535.                          long *ugID);
  536. /*    ¶ Map a user or group name to a user or group ID.
  537.     The HMapName function determines the user or group ID if you know the
  538.     user or group name.
  539.     
  540.     volName        input:    A pointer to the name of a mounted volume
  541.                         or nil.
  542.     vRefNum        input:    Volume specification.
  543.     name        input:    The user or group name.
  544.     objType        input:    The mapping function code: 3 if you're mapping a
  545.                         user name to a user ID or 4 if you're mapping a
  546.                         group name to a group ID.
  547.     ugID        output:    The user or group ID.
  548.  
  549.     __________
  550.     
  551.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  552.                 FSpSetDirAccess, HMapID
  553. */
  554.  
  555. /*****************************************************************************/
  556.  
  557. pascal    OSErr    HCopyFile(short srcVRefNum,
  558.                           long srcDirID,
  559.                           ConstStr255Param srcName,
  560.                           short dstVRefNum,
  561.                           long dstDirID,
  562.                           StringPtr dstPathname,
  563.                           StringPtr copyName);
  564. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  565.     The HCopyFile function duplicates a file and optionally to renames it.
  566.     The source and destination volumes must be on the same file server.
  567.     This function instructs the server to copy the file.
  568.     
  569.     srcVRefNum    input:    Source volume specification.
  570.     srcDirID    input:    Source directory ID.
  571.     srcName        input:    Source file name.
  572.     dstVRefNum    input:    Destination volume specification.
  573.     dstDirID    input:    Destination directory ID.
  574.     dstPathname    input:    Pointer to destination directory name, or
  575.                         nil when dstDirID specifies a directory.
  576.     copyName    input:    Points to the new file name if the file is to be
  577.                         renamed or nil if the file isn't to be renamed.
  578.  
  579.     __________
  580.     
  581.     Also see:    FSpCopyFile, FileCopy, FSpFileCopy
  582. */
  583.  
  584. /*****************************************************************************/
  585.  
  586. pascal    OSErr    FSpCopyFile(const FSSpec *srcSpec,
  587.                             const FSSpec *dstSpec,
  588.                             StringPtr copyName);
  589. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  590.     The FSpCopyFile function duplicates a file and optionally to renames it.
  591.     The source and destination volumes must be on the same file server.
  592.     This function instructs the server to copy the file.
  593.     
  594.     srcSpec        input:    An FSSpec record specifying the source file.
  595.     dstSpec        input:    An FSSpec record specifying the destination
  596.                         directory.
  597.     copyName    input:    Points to the new file name if the file is to be
  598.                         renamed or nil if the file isn't to be renamed.
  599.  
  600.     __________
  601.     
  602.     Also see:    HCopyFile, FileCopy, FSpFileCopy
  603. */
  604.  
  605. /*****************************************************************************/
  606.  
  607. pascal    OSErr    HMoveRename(short vRefNum,
  608.                             long srcDirID,
  609.                             ConstStr255Param srcName,
  610.                             long dstDirID,
  611.                             StringPtr dstpathName,
  612.                             StringPtr copyName);
  613. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  614.     The HMoveRename function moves a file or directory and optionally
  615.     renames it. The source and destination locations must be on the same
  616.     shared volume.
  617.     
  618.     vRefNum        input:    Volume specification.
  619.     srcDirID    input:    Source directory ID.
  620.     srcName        input:    The source object name.
  621.     dstDirID    input:    Destination directory ID.
  622.     dstName        input:    Pointer to destination directory name, or
  623.                         nil when dstDirID specifies a directory.
  624.     copyName    input:    Points to the new name if the object is to be
  625.                         renamed or nil if the object isn't to be renamed.
  626.  
  627.     __________
  628.     
  629.     Also see:    FSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  630. */
  631.  
  632. /*****************************************************************************/
  633.  
  634. pascal    OSErr    FSpMoveRename(const FSSpec *srcSpec,
  635.                               const FSSpec *dstSpec,
  636.                               StringPtr copyName);
  637. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  638.     The FSpMoveRename function moves a file or directory and optionally
  639.     renames it. The source and destination locations must be on the same
  640.     shared volume.
  641.     
  642.     srcSpec        input:    An FSSpec record specifying the source object.
  643.     dstSpec        input:    An FSSpec record specifying the destination
  644.                         directory.
  645.     copyName    input:    Points to the new name if the object is to be
  646.                         renamed or nil if the object isn't to be renamed.
  647.  
  648.     __________
  649.     
  650.     Also see:    HMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  651. */
  652.  
  653. /*****************************************************************************/
  654.  
  655. pascal    OSErr    GetVolMountInfoSize(StringPtr volName,
  656.                                     short vRefNum,
  657.                                     short *size);
  658. /*    ¶ Get the size of a volume mounting information record.
  659.     The GetVolMountInfoSize function determines the how much space the
  660.     program needs to allocate for a volume mounting information record.
  661.     
  662.     volName        input:    A pointer to the name of a mounted volume
  663.                         or nil.
  664.     vRefNum        input:    Volume specification.
  665.     size        output:    The space needed (in bytes) of the volume mounting
  666.                         information record.
  667.  
  668.     __________
  669.     
  670.     Also see:    GetVolMountInfo, VolumeMount BuildAFPVolMountInfo,
  671.                 RetrieveAFPVolMountInfo
  672. */
  673.  
  674. /*****************************************************************************/
  675.  
  676. pascal    OSErr    GetVolMountInfo(StringPtr volName,
  677.                                 short vRefNum,
  678.                                 void *volMountInfo);
  679. /*    ¶ Retrieve a volume mounting information record.
  680.     The GetVolMountInfo function retrieves a volume mounting information
  681.     record containing all the information needed to mount the volume,
  682.     except for passwords.
  683.     
  684.     volName            input:    A pointer to the name of a mounted volume
  685.                             or nil.
  686.     vRefNum            input:    Volume specification.
  687.     volMountInfo    output:    Points to a volume mounting information
  688.                             record where the mounting information is to
  689.                             be returned.
  690.  
  691.     __________
  692.     
  693.     Also see:    GetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,
  694.                 RetrieveAFPVolMountInfo
  695. */
  696.  
  697. /*****************************************************************************/
  698.  
  699. pascal    OSErr    VolumeMount(void *volMountInfo,
  700.                             short *vRefNum);
  701. /*    ¶ Mount a volume using a volume mounting information record.
  702.     The VolumeMount function mounts a volume using a volume mounting
  703.     information record.
  704.     
  705.     volMountInfo    input:    Points to a volume mounting information record.
  706.     vRefNum            output:    A volume reference number.
  707.  
  708.     __________
  709.     
  710.     Also see:    GetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,
  711.                 RetrieveAFPVolMountInfo
  712. */
  713.  
  714. /*****************************************************************************/
  715.  
  716. pascal    OSErr    Share(short vRefNum,
  717.                       long dirID,
  718.                       StringPtr name);
  719. /*    ¶ Establish a local volume or directory as a share point.
  720.     The Share function establishes a local volume or directory as a
  721.     share point.
  722.  
  723.     vRefNum            input:    Volume specification.
  724.     dirID            input:    Directory ID.
  725.     name            input:    Pointer to directory name, or nil if dirID
  726.                             specifies the directory.
  727.  
  728.     __________
  729.     
  730.     Also see:    FSpShare, Unshare, FSpUnshare
  731. */
  732.  
  733. /*****************************************************************************/
  734.  
  735. pascal    OSErr    FSpShare(const FSSpec *spec);
  736. /*    ¶ Establish a local volume or directory as a share point.
  737.     The FSpShare function establishes a local volume or directory as a
  738.     share point.
  739.  
  740.     spec    input:    An FSSpec record specifying the share point.
  741.  
  742.     Also see:    Share, Unshare, FSpUnshare
  743. */
  744.  
  745. /*****************************************************************************/
  746.  
  747. pascal    OSErr    Unshare(short vRefNum,
  748.                         long dirID,
  749.                         StringPtr name);
  750. /*    ¶ Remove a share point.
  751.     The Unshare function removes a share point.
  752.  
  753.     vRefNum            input:    Volume specification.
  754.     dirID            input:    Directory ID.
  755.     name            input:    Pointer to directory name, or nil if dirID
  756.                             specifies the directory.
  757.  
  758.     __________
  759.     
  760.     Also see:    Share, FSpShare, FSpUnshare
  761. */
  762.  
  763. /*****************************************************************************/
  764.  
  765. pascal    OSErr    FSpUnshare(const FSSpec *spec);
  766. /*    ¶ Remove a share point.
  767.     The FSpUnshare function removes a share point.
  768.  
  769.     spec    input:    An FSSpec record specifying the share point.
  770.  
  771.     __________
  772.     
  773.     Also see:    Share, FSpShare, Unshare
  774. */
  775.  
  776. /*****************************************************************************/
  777.  
  778. pascal    OSErr    GetUGEntry(short objType,
  779.                            StringPtr objName,
  780.                            long *objID);
  781. /*    ¶ Retrieve a user or group entry from the local file server.
  782.     The GetUGEntry function retrieves user or group entries from the
  783.     local file server.
  784.  
  785.     objType        input:    The object type: -1 = group; 0 = user
  786.     objName        input:    Points to a buffer (minimum Str31) where the user
  787.                         or group name is to be returned or must be nil.
  788.                 output:    The user or group name.
  789.     objID        input:    O to get the first user or group. If the entry objID
  790.                         last returned by GetUGEntry is passed, then user or
  791.                         group whose alphabetically next in the list of entries
  792.                         is returned.
  793.                 output:    The user or group ID.
  794.  
  795.     __________
  796.     
  797.     Also see:    GetUGEntries
  798. */
  799.  
  800. /*****************************************************************************/
  801.  
  802. #ifdef __cplusplus
  803. }
  804. #endif
  805.  
  806. #endif    /* __MOREFILES__ */
  807.